<?php

use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //循环插入数据
        $data=[];

        for($i=0;$i<200;$i++){
        	$upd=[];
        	$upd['username'] = str_random(10);
        	$upd['password'] = Hash::make('qwertyuiop');
        	$upd['email'] = rand(1000000,999999999).'@qq.com';
        	$upd['phone'] = '15'.rand(100000000,999999999);
        	$upd['photo'] = '/uploads/20161115/1479206875942349.jpg';
        	$data[] = $upd;
        }
        DB::table('user')->insert($data);
    }
}
